﻿@section title
{
    我的鲜享余额
}

@section pagetitle
{
    我的鲜享余额
}
@section header
{
    <link href="~/Themes/RongJi/Style/base/css/balance.css" rel="stylesheet" />
    <style>
        /*.pageHeaderMini {
            display: none;
        }*/
    </style>
}

@model RiderShop.Mobile.Modle.MyAccount.BalanceModel



@if (Model.BalanceAccount == null)
{

    <h3>您没有鲜享余额特权，请先添加鲜享余额卡</h3>

}
else
{
    <header class="moneyHeader">
        @if (Model.BalanceIncomeHistory.Count > 0)
        {
            <h1>
                @* <i class="glyphicon glyphicon-question-sign"></i>*@
                <em><i class="glyphicon glyphicon-calendar"></i> 昨日收益(元)</em>
                @Model.BalanceIncomeHistory[0].AdditionalIncome.ToString("N2")
            </h1>
        }
        else
        {
            <h1>
                <i class="glyphicon glyphicon-question-sign"></i>
                <em><i class="glyphicon glyphicon-calendar"></i> 昨日收益(元)</em>
                0.00
            </h1>
        }
        <h2>
            <a href="BalanceIncomeHistory">
                <i class="glyphicon glyphicon-th-list"></i>
            </a>
            <em>总金额(元)</em>
            @((Model.BalanceAccount.CurrentBalance + Model.BalanceAccount.PaymentCardBalance + Model.BalanceAccount.CurrentIncome).ToString("N2"))
        </h2>
    </header>
    <ul class="moneyStatus">
        <li class="b20">
            <em>月收益(‰)</em>
            5‰
            <a href="BalanceIncomeHistory">月收益</a>
        </li>
        <li class="b20">
            <em>累计收益(元)</em>
            @Model.BalanceAccount.TotalIncome.ToString("N2")
            <a href="BalanceIncomeHistory">累计收益</a>
        </li>
        <li>
            <em>近一周收益(元)</em>
            @(Model.BalanceIncomeHistory.Where(h => h.OperateDate > DateTime.Now.AddDays(-7)).Sum(h => h.AdditionalIncome).ToString("N2"))
            <a href="BalanceIncomeHistory">近一周收益</a>
        </li>
        <li>
            <em>近一月收益(元)</em>
            @(Model.BalanceIncomeHistory.Sum(h => h.AdditionalIncome).ToString("N2"))
            <a href="BalanceIncomeHistory">近一月收益</a>
        </li>
        <br class="clearfix">
    </ul>
}